import 'package:flutter_crud_test_amir_rabbani/core/params/create_customer_params.dart';
import 'package:flutter_crud_test_amir_rabbani/core/resource/data_state.dart';
import 'package:flutter_crud_test_amir_rabbani/core/resource/use_case.dart';
import 'package:flutter_crud_test_amir_rabbani/data/local/my_database.dart';
import 'package:flutter_crud_test_amir_rabbani/data/repositories/customer_repository.dart';

class CreateCustomerUseCase
    extends UseCase<DataState<NoResponse>, CreateCustomerParams> {
  CustomerRepository repository;

  CreateCustomerUseCase(this.repository);

  @override
  Future<DataState<NoResponse>> call(CreateCustomerParams param) async {
    return await repository.create(param);
  }
}
